#include "sensors.h"

sensors::sensors( int whichOne ) : arduino( whichOne )
{

}

sensors::~sensors()
{

}

  
int sensors::leIR(int IR_ID)
{
  char res[10];
  char number[5];
  int response;
  
  if( readArduino( LE_SENSORES,IR_ID,ARDUINO_OMNI, res ) < 0 )
    return -1;
  
  number[0] = res[1];
  number[1] = res[2];
  number[2] = res[3];
  number[3] = res[4];
  number[4] = '\0';
  
  response = atoi(number);
  
return response;
}

